loop code for X seconds

107

loop code for X seconds -

float timePassed = 0f;
void Update()
{
    timePassed += Time.deltaTime;
    if(timePassed > 5f)
    {
        //do something
    } 
}

Comments

Submit
0 Comments